Is $ a reserved character

I have a script that is supposed to open 2 baselines of the currently opened module and compare all of the selected attributes to determine whether objects have been added/deleted/modified.  For some reason, even though $C10 is not a selected attribute, the script tries to look for this attribute in the older version.  If it doesn't exist in the older baseline, the script will throw a DXL error that $C10 is an unknown Object attribute.  This error appears even when $C10 is not selected as one of the attributes to check.  It doesn't make sense because the error occurs on the following line of code:

              bm1 = load(m, b1, true);

Here is the full code segment where the error appears:

 

     infoBox("Test message 1");
          //***************Get Baseline 1 version string*****************************
     if (null b1) {
          b1 = getMostRecentBaseline(m)
          bm1 = load(m, b1, true)
          ver1 = "Baseline " (major b1) "." (minor b1) (suffix b1 "" != "" ? " (" (suffix b1) ")" : "");
     } else {
          bm1 = load(m, b1, true);
          infoBox("Not null b1");
          ver1 = "Baseline " (major b1) "." (minor b1) (suffix b1 "" != "" ? " (" (suffix b1) ")" : "");
     }
     infoBox("Test message 2");

 

 

When I run the code above, I get the Test message 1 infoBox followed by the DXL error followed by the "Not null b1" and Test message 2 infoBoxes.

The other issue I have is that if I try to run the same code on another module that contains a newer attribute but doesn't include $, I don't get the error message.  I've attached a document that shows the options for each of these modules.  The only item I can see that is different is that the module that displays the DXL error has a $ symbol in front.

 

Chris


chrscote - Thu Mar 14 12:16:27 EDT 2019

Re: Is $ a reserved character
Mike.Scharnow - Thu Mar 14 12:33:59 EDT 2019

This code segment looks more or less harmless - I cannot see why it should fail, let alone why it should care for the existence of object attributes, it does nothing more than open a baseline.

My guess is that the module contains a view, perhaps even a default view, which contains a DXL column with code that is not compatible with older baselines. Note that views are not stored per baseline but per Module. So, a view that works in the current version might make problems when you open an older version.

 

But if my guess is right, then you should see the same DXL error, as soon as you open one of the two chosen baselines in a normal DOORS window, completely independent of any comparison script

Re: Is $ a reserved character
chrscote - Fri Mar 15 08:57:40 EDT 2019

Mike.Scharnow - Thu Mar 14 12:33:59 EDT 2019

This code segment looks more or less harmless - I cannot see why it should fail, let alone why it should care for the existence of object attributes, it does nothing more than open a baseline.

My guess is that the module contains a view, perhaps even a default view, which contains a DXL column with code that is not compatible with older baselines. Note that views are not stored per baseline but per Module. So, a view that works in the current version might make problems when you open an older version.

 

But if my guess is right, then you should see the same DXL error, as soon as you open one of the two chosen baselines in a normal DOORS window, completely independent of any comparison script

OK, I think I've found the issue.  When I open the older baseline and go to a particular view, I am getting the same error message I mentioned above.  The older baseline doesn't have $C8-$C10 as an attribute.  Is there any way to get around this error message appearing in the script?

 

Chris

Re: Is $ a reserved character
Mike.Scharnow - Fri Mar 15 09:29:35 EDT 2019

chrscote - Fri Mar 15 08:57:40 EDT 2019

OK, I think I've found the issue.  When I open the older baseline and go to a particular view, I am getting the same error message I mentioned above.  The older baseline doesn't have $C8-$C10 as an attribute.  Is there any way to get around this error message appearing in the script?

 

Chris

There is no easy way to open a view which contains code that produces errors, there have been some discussions in this forum. Usually one should work with the "Standard View", as it does not contain any DXL attributes nor DXL layout columns.

 

You say that you first open the old baseline and then open the particular view, so the "bad" view is NOT the default view. The question then is why the "Baseline Comparison Report" tries to open this particular view. Normally, this should not be necessary in a baseline comparison utility. Perhaps you need to change the behaviour of this reporting tool.

 

Then again, if the bad view IS the default view then you might be able to get away without changing any code:

  • open the module
  • change it so that the default view is "Standard View"
  • start the baseline comparison report